/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utility;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Student
 */
public class DBConnection {
    String url = "jdbc:mysql://localhost/dbtoko";
    String user = "root";
    String pass = "";
    Connection conn = null;
    
    public DBConnection(){
        try{
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            conn = DriverManager.getConnection(url, user, pass);
        }catch(Exception ex){
            ex.printStackTrace();
        }
    }
    
    public Connection getConnection(){
        return this.conn;
    }
}
